package router

import (
	"github.com/gin-gonic/gin"
	"net/http"
)

type OpenRouters struct {
	Name        string
	RouterGroup *gin.RouterGroup
}

func (mr *OpenRouters) SetName() {
	mr.Name = "open"
}

func (mr *OpenRouters) GetName() string {
	return mr.Name
}

func (mr *OpenRouters) SetGroupName(r *gin.Engine) {
	mr.RouterGroup = r.Group(mr.Name)
}

func (mr *OpenRouters) InitRouters() {

	mr.RouterGroup.POST("customer/singleAdd", func(c *gin.Context) {
		c.JSON(http.StatusOK, gin.H{
			"message": mr.Name + "/customer/singleAdd",
		})
	})

}
